<div class="head-content">
    <h3>Users</h3>
    <div class="head-content-nav">
        <ul>
            <li><a href="#" class="active">Edit Data</a></li>
            <li><a href="{$config->site_url('settings/adminuser/add')}"><img src="{$BASEURL}resource/doc/images/icon/add-icon.png" alt="" /> Add Data</a></li>
            <li><a href="{$config->site_url('settings/adminuser')}">List Data</a></li>
        </ul>
    </div>
    <div class="clear"></div>
</div>
<!-- notification template -->
{include file="base/templates/notification.html"}
<!-- end of notification template-->
<form action="{$config->site_url('settings/adminuser/edit_process')}" method="post">
    <input type="hidden" name="user_id" value="{$result.user_id|default:''}" />
    <input type="hidden" name="user_name_old" value="{$result.user_name|default:''}" />
    <input type="hidden" name="user_mail_old" value="{$result.user_mail|default:''}" />
    <table class="table-input" width="100%">
        <tr class="headrow">
            <th colspan="2">Edit Data</th>
        </tr>
        <tr>
            <th colspan="2">User Info</th>
        </tr>
        <tr>
            <td width="25%">Nama Lengkap *</td>
            <td width="75%"><input type="text" name="petugas_name" maxlength="50" size="30" value="{$result.petugas_name|default:''}" /></td>
        </tr>
        <tr>
            <td>Alamat *</td>
            <td><input type="text" name="petugas_alamat" maxlength="255" size="60" value="{$result.petugas_alamat|default:''}" /> </td>
        </tr>
        <tr>
            <td>Email *</td>
            <td><input type="text" name="user_mail" maxlength="50" size="30" value="{$result.user_mail|default:''}" /></td>
        </tr>
        <tr>
            <td>Nomor Telepon *</td>
            <td><input type="text" name="petugas_telepon" maxlength="50" size="30" value="{$result.petugas_telepon|default:''}" /> </td>
        </tr>
        <tr>
            <th colspan="2">User Account</th>
        </tr>
        <tr>
            <td>User Name *</td>
            <td><input type="text" name="user_name" maxlength="50" size="20" value="{$result.user_name|default:''}" /> </td>
        </tr>
        <tr>
            <td>Password</td>
            <td><input type="text" name="user_pass" maxlength="50" size="20" value="{$result.user_pass|default:''}" /></td>
        </tr>
        <tr>
            <td>Lock Status *</td>
            <td>
                <select name="lock_st">
                    <option value="0" {if {$result.lock_st|default:''} == "0"}selected="selected"{/if}>Active</option>
                    <option value="1" {if {$result.lock_st|default:''} == "1"}selected="selected"{/if}>Blocked</option>
                </select>
            </td>
        </tr>
        <tr>
            <td>Hak Akses *</td>
            <td>
                <select name="role_id">
                    <option></option>
                    {foreach from=$rs_role item=data}
                    <option value="{$data.role_id}" {if {$result.role_id|default:''} == $data.role_id}selected="selected"{/if}>{$data.role_nm}</option>
                    {/foreach}
                </select>
            </td>
        </tr>
        <tr>
            <td colspan="2"><input type="submit" name="save" value="Simpan" class="edit-button" /> </td>
        </tr>
    </table>
</form>